package demo1;

public class Dog extends Animal{
    public void bark(){
        System.out.println("汪汪叫");
    }
    public void wag(){
        System.out.println("摇尾巴");
    }
  public Dog(int age,String name){
        super(age, name);
    }

    @Override
    public String toString() {
        return "Dog{" +
                "age=" + age +
                ", name='" + name + '\'' +
                '}';
    }

    @Override
    public void eat() {
        System.out.println(this.name+"吃狗粮");
    }
}